.class Lrexsee/network/SocketClient$1;
.super Ljava/lang/Thread;
.source "SocketClient.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lrexsee/network/SocketClient;->run()V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Lrexsee/network/SocketClient;


# direct methods
.method constructor <init>(Lrexsee/network/SocketClient;)V
    .locals 0

    .prologue
    .line 1
    iput-object p1, p0, Lrexsee/network/SocketClient$1;->this$0:Lrexsee/network/SocketClient;

    .line 47
    invoke-direct {p0}, Ljava/lang/Thread;-><init>()V

    return-void
.end method


# virtual methods
.method public run()V
    .locals 9

    .prologue
    .line 51
    :try_start_0
    iget-object v4, p0, Lrexsee/network/SocketClient$1;->this$0:Lrexsee/network/SocketClient;

    # getter for: Lrexsee/network/SocketClient;->mSocket:Ljava/net/Socket;
    invoke-static {v4}, Lrexsee/network/SocketClient;->access$0(Lrexsee/network/SocketClient;)Ljava/net/Socket;

    move-result-object v4

    invoke-virtual {v4}, Ljava/net/Socket;->getInputStream()Ljava/io/InputStream;

    move-result-object v2

    .line 52
    .local v2, "inputStream":Ljava/io/InputStream;
    :cond_0
    :goto_0
    iget-object v4, p0, Lrexsee/network/SocketClient$1;->this$0:Lrexsee/network/SocketClient;

    # getter for: Lrexsee/network/SocketClient;->mSocket:Ljava/net/Socket;
    invoke-static {v4}, Lrexsee/network/SocketClient;->access$0(Lrexsee/network/SocketClient;)Ljava/net/Socket;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_1

    move-result-object v4

    if-nez v4, :cond_2

    .line 70
    .end local v2    # "inputStream":Ljava/io/InputStream;
    :cond_1
    :goto_1
    return-void

    .line 54
    .restart local v2    # "inputStream":Ljava/io/InputStream;
    :cond_2
    :try_start_1
    invoke-virtual {v2}, Ljava/io/InputStream;->available()I

    move-result v3

    .line 55
    .local v3, "length":I
    if-nez v3, :cond_3

    .line 56
    iget-object v4, p0, Lrexsee/network/SocketClient$1;->this$0:Lrexsee/network/SocketClient;

    # getter for: Lrexsee/network/SocketClient;->mReadingCycle:I
    invoke-static {v4}, Lrexsee/network/SocketClient;->access$1(Lrexsee/network/SocketClient;)I

    move-result v4

    int-to-long v4, v4

    invoke-static {v4, v5}, Ljava/lang/Thread;->sleep(J)V
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_0

    goto :goto_0

    .line 62
    .end local v3    # "length":I
    :catch_0
    move-exception v4

    move-object v1, v4

    .line 63
    .local v1, "e":Ljava/lang/Exception;
    :try_start_2
    iget-object v4, p0, Lrexsee/network/SocketClient$1;->this$0:Lrexsee/network/SocketClient;

    invoke-virtual {v4}, Lrexsee/network/SocketClient;->close()V

    .line 64
    iget-object v4, p0, Lrexsee/network/SocketClient$1;->this$0:Lrexsee/network/SocketClient;

    # getter for: Lrexsee/network/SocketClient;->mOnLost:Lrexsee/network/SocketAbstractClass$SocketLostListener;
    invoke-static {v4}, Lrexsee/network/SocketClient;->access$4(Lrexsee/network/SocketClient;)Lrexsee/network/SocketAbstractClass$SocketLostListener;

    move-result-object v4

    if-eqz v4, :cond_1

    iget-object v4, p0, Lrexsee/network/SocketClient$1;->this$0:Lrexsee/network/SocketClient;

    # getter for: Lrexsee/network/SocketClient;->mOnLost:Lrexsee/network/SocketAbstractClass$SocketLostListener;
    invoke-static {v4}, Lrexsee/network/SocketClient;->access$4(Lrexsee/network/SocketClient;)Lrexsee/network/SocketAbstractClass$SocketLostListener;

    move-result-object v4

    iget-object v5, p0, Lrexsee/network/SocketClient$1;->this$0:Lrexsee/network/SocketClient;

    # getter for: Lrexsee/network/SocketClient;->mClientId:Ljava/lang/String;
    invoke-static {v5}, Lrexsee/network/SocketClient;->access$3(Lrexsee/network/SocketClient;)Ljava/lang/String;

    move-result-object v5

    const-wide/16 v6, -0x1

    invoke-virtual {v1}, Ljava/lang/Exception;->getLocalizedMessage()Ljava/lang/String;

    move-result-object v8

    invoke-virtual {v4, v5, v6, v7, v8}, Lrexsee/network/SocketAbstractClass$SocketLostListener;->run(Ljava/lang/String;JLjava/lang/String;)V
    :try_end_2
    .catch Ljava/lang/Exception; {:try_start_2 .. :try_end_2} :catch_1

    goto :goto_1

    .line 68
    .end local v1    # "e":Ljava/lang/Exception;
    .end local v2    # "inputStream":Ljava/io/InputStream;
    :catch_1
    move-exception v4

    goto :goto_1

    .line 58
    .restart local v2    # "inputStream":Ljava/io/InputStream;
    .restart local v3    # "length":I
    :cond_3
    :try_start_3
    new-array v0, v3, [B

    .line 59
    .local v0, "buffer":[B
    invoke-virtual {v2, v0}, Ljava/io/InputStream;->read([B)I

    .line 60
    iget-object v4, p0, Lrexsee/network/SocketClient$1;->this$0:Lrexsee/network/SocketClient;

    # getter for: Lrexsee/network/SocketClient;->mOnRead:Lrexsee/network/SocketAbstractClass$SocketDataListener;
    invoke-static {v4}, Lrexsee/network/SocketClient;->access$2(Lrexsee/network/SocketClient;)Lrexsee/network/SocketAbstractClass$SocketDataListener;

    move-result-object v4

    if-eqz v4, :cond_0

    iget-object v4, p0, Lrexsee/network/SocketClient$1;->this$0:Lrexsee/network/SocketClient;

    # getter for: Lrexsee/network/SocketClient;->mOnRead:Lrexsee/network/SocketAbstractClass$SocketDataListener;
    invoke-static {v4}, Lrexsee/network/SocketClient;->access$2(Lrexsee/network/SocketClient;)Lrexsee/network/SocketAbstractClass$SocketDataListener;

    move-result-object v4

    iget-object v5, p0, Lrexsee/network/SocketClient$1;->this$0:Lrexsee/network/SocketClient;

    # getter for: Lrexsee/network/SocketClient;->mClientId:Ljava/lang/String;
    invoke-static {v5}, Lrexsee/network/SocketClient;->access$3(Lrexsee/network/SocketClient;)Ljava/lang/String;

    move-result-object v5

    const-wide/16 v6, -0x1

    invoke-virtual {v4, v5, v6, v7, v0}, Lrexsee/network/SocketAbstractClass$SocketDataListener;->run(Ljava/lang/String;J[B)V
    :try_end_3
    .catch Ljava/lang/Exception; {:try_start_3 .. :try_end_3} :catch_0

    goto :goto_0
.end method
